import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
// import About from '../views/About.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue'),
  },
  {
    path: '/user',
    name: 'user',
    component: () => import('../views/user.vue'),
    redirect:{name:'lesson'},
    children: [
      {
        path: 'lesson',
        name: 'lesson',
        component: () => import('../views/lesson.vue')
      },
      {
        path: 'email',
        name: 'email',
        component: () => import('../views/email.vue')
      },
      {
        path: 'set',
        name: 'set',
        component: () => import('../views/set.vue')
      },

    ]
  },


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
